#include "taskattachmentrequest.h"

namespace Wishmaster {

TaskAttachmentRequest::TaskAttachmentRequest(const PostId& postId, int attachmentIndex, const QUrl& link, const QString& msg, Connector* connector)
	: TaskRequest(rtAttachment, link, msg, connector), m_postId(postId),
	m_attachmentIndex(attachmentIndex)
{
}

void TaskAttachmentRequest::slot_result(const RequestPtr& rq, const QByteArray& arr)
{
	if(rq)
		emit result(this, arr, rq->contentType());
	TaskRequest::slot_result(rq, arr);
}

PostId TaskAttachmentRequest::postId() const
{
	return m_postId;
}

int TaskAttachmentRequest::attachmentIndex() const
{
	return m_attachmentIndex;
}


} // namespace Wishmaster
